package o;

import android.content.Context;
import android.graphics.drawable.Drawable;
import android.util.Log;
import androidx.annotation.DrawableRes;
import androidx.annotation.GuardedBy;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import com.bumptech.glide.load.engine.GlideException;
import java.util.List;
import java.util.concurrent.Executor;
import o.to.b;

public final class zr<R> implements zm, aaa, zq {
    private static final boolean ˎ = Log.isLoggable("Request", 2);
    private final zj ʻ;
    private final Executor ʻॱ;
    private final rh ʼ;
    private volatile to ʼॱ;
    private final Class<R> ʽ;
    @GuardedBy("requestLock")
    @Nullable
    private Drawable ʽॱ;
    @GuardedBy("requestLock")
    private long ʾ;
    @GuardedBy("requestLock")
    @Nullable
    private Drawable ʿ;
    @GuardedBy("requestLock")
    private c ˈ;
    @GuardedBy("requestLock")
    private int ˉ;
    @Nullable
    private final String ˊ;
    @Nullable
    private RuntimeException ˊˊ;
    @GuardedBy("requestLock")
    private int ˊˋ;
    private final ze<?> ˊॱ;
    @GuardedBy("requestLock")
    private boolean ˊᐝ;
    private final abb ˋ;
    @GuardedBy("requestLock")
    @Nullable
    private Drawable ˋˊ;
    private final int ˋॱ;
    private final Object ˏ;
    private final int ˏॱ;
    private final rl ͺ;
    @Nullable
    private final zn<R> ॱ;
    private final zz<R> ॱˊ;
    private final aag<? super R> ॱˋ;
    @GuardedBy("requestLock")
    private tx<R> ॱˎ;
    @Nullable
    private final Object ॱॱ;
    @GuardedBy("requestLock")
    private b ॱᐝ;
    private final Context ᐝ;
    @Nullable
    private final List<zn<R>> ᐝॱ;

    enum c {
        PENDING,
        RUNNING,
        WAITING_FOR_SIZE,
        COMPLETE,
        FAILED,
        CLEARED
    }

    public static <R> zr<R> ˊ(Context context, rh rhVar, Object obj, Object obj2, Class<R> cls, ze<?> zeVar, int i, int i2, rl rlVar, zz<R> zzVar, zn<R> znVar, @Nullable List<zn<R>> list, zj zjVar, to toVar, aag<? super R> o_aag__super_R, Executor executor) {
        return new zr(context, rhVar, obj, obj2, cls, zeVar, i, i2, rlVar, zzVar, znVar, list, zjVar, toVar, o_aag__super_R, executor);
    }

    private zr(Context context, rh rhVar, @NonNull Object obj, @Nullable Object obj2, Class<R> cls, ze<?> zeVar, int i, int i2, rl rlVar, zz<R> zzVar, @Nullable zn<R> znVar, @Nullable List<zn<R>> list, zj zjVar, to toVar, aag<? super R> o_aag__super_R, Executor executor) {
        this.ˊ = ˎ ? String.valueOf(super.hashCode()) : null;
        this.ˋ = abb.ˊ();
        this.ˏ = obj;
        this.ᐝ = context;
        this.ʼ = rhVar;
        this.ॱॱ = obj2;
        this.ʽ = cls;
        this.ˊॱ = zeVar;
        this.ˋॱ = i;
        this.ˏॱ = i2;
        this.ͺ = rlVar;
        this.ॱˊ = zzVar;
        this.ॱ = znVar;
        this.ᐝॱ = list;
        this.ʻ = zjVar;
        this.ʼॱ = toVar;
        this.ॱˋ = o_aag__super_R;
        this.ʻॱ = executor;
        this.ˈ = c.PENDING;
        if (this.ˊˊ == null && rhVar.ʼ()) {
            this.ˊˊ = new RuntimeException("Glide request origin trace");
        }
    }

    /* JADX WARNING: inconsistent code. */
    /* Code decompiled incorrectly, please refer to instructions dump. */
    public void ˏ() {
        /*
        r4 = this;
        r1 = r4.ˏ;
        monitor-enter(r1);
        r4.ᐝ();	 Catch:{ all -> 0x004a }
        r0 = r4.ˋ;	 Catch:{ all -> 0x004a }
        r0.ˎ();	 Catch:{ all -> 0x004a }
        r2 = o.aaq.ॱ();	 Catch:{ all -> 0x004a }
        r4.ʾ = r2;	 Catch:{ all -> 0x004a }
        r0 = r4.ॱॱ;	 Catch:{ all -> 0x004a }
        if (r0 != 0) goto L_0x003c;
    L_0x0015:
        r0 = r4.ˋॱ;	 Catch:{ all -> 0x004a }
        r2 = r4.ˏॱ;	 Catch:{ all -> 0x004a }
        r0 = o.aau.ˊ(r0, r2);	 Catch:{ all -> 0x004a }
        if (r0 == 0) goto L_0x0027;
    L_0x001f:
        r0 = r4.ˋॱ;	 Catch:{ all -> 0x004a }
        r4.ˊˋ = r0;	 Catch:{ all -> 0x004a }
        r0 = r4.ˏॱ;	 Catch:{ all -> 0x004a }
        r4.ˉ = r0;	 Catch:{ all -> 0x004a }
    L_0x0027:
        r0 = r4.ˊॱ();	 Catch:{ all -> 0x004a }
        if (r0 != 0) goto L_0x003a;
    L_0x002d:
        r0 = 5;
    L_0x002e:
        r2 = new com.bumptech.glide.load.engine.GlideException;	 Catch:{ all -> 0x004a }
        r3 = "Received null model";
        r2.<init>(r3);	 Catch:{ all -> 0x004a }
        r4.ˊ(r2, r0);	 Catch:{ all -> 0x004a }
        monitor-exit(r1);	 Catch:{ all -> 0x004a }
    L_0x0039:
        return;
    L_0x003a:
        r0 = 3;
        goto L_0x002e;
    L_0x003c:
        r0 = r4.ˈ;	 Catch:{ all -> 0x004a }
        r2 = o.zr.c.RUNNING;	 Catch:{ all -> 0x004a }
        if (r0 != r2) goto L_0x004d;
    L_0x0042:
        r0 = new java.lang.IllegalArgumentException;	 Catch:{ all -> 0x004a }
        r2 = "Cannot restart a running request";
        r0.<init>(r2);	 Catch:{ all -> 0x004a }
        throw r0;	 Catch:{ all -> 0x004a }
    L_0x004a:
        r0 = move-exception;
        monitor-exit(r1);	 Catch:{ all -> 0x004a }
        throw r0;
    L_0x004d:
        r0 = r4.ˈ;	 Catch:{ all -> 0x004a }
        r2 = o.zr.c.COMPLETE;	 Catch:{ all -> 0x004a }
        if (r0 != r2) goto L_0x005c;
    L_0x0053:
        r0 = r4.ॱˎ;	 Catch:{ all -> 0x004a }
        r2 = o.rz.MEMORY_CACHE;	 Catch:{ all -> 0x004a }
        r4.ˋ(r0, r2);	 Catch:{ all -> 0x004a }
        monitor-exit(r1);	 Catch:{ all -> 0x004a }
        goto L_0x0039;
    L_0x005c:
        r0 = o.zr.c.WAITING_FOR_SIZE;	 Catch:{ all -> 0x004a }
        r4.ˈ = r0;	 Catch:{ all -> 0x004a }
        r0 = r4.ˋॱ;	 Catch:{ all -> 0x004a }
        r2 = r4.ˏॱ;	 Catch:{ all -> 0x004a }
        r0 = o.aau.ˊ(r0, r2);	 Catch:{ all -> 0x004a }
        if (r0 == 0) goto L_0x00ae;
    L_0x006a:
        r0 = r4.ˋॱ;	 Catch:{ all -> 0x004a }
        r2 = r4.ˏॱ;	 Catch:{ all -> 0x004a }
        r4.ˊ(r0, r2);	 Catch:{ all -> 0x004a }
    L_0x0071:
        r0 = r4.ˈ;	 Catch:{ all -> 0x004a }
        r2 = o.zr.c.RUNNING;	 Catch:{ all -> 0x004a }
        if (r0 == r2) goto L_0x007d;
    L_0x0077:
        r0 = r4.ˈ;	 Catch:{ all -> 0x004a }
        r2 = o.zr.c.WAITING_FOR_SIZE;	 Catch:{ all -> 0x004a }
        if (r0 != r2) goto L_0x008c;
    L_0x007d:
        r0 = r4.ॱˋ();	 Catch:{ all -> 0x004a }
        if (r0 == 0) goto L_0x008c;
    L_0x0083:
        r0 = r4.ॱˊ;	 Catch:{ all -> 0x004a }
        r2 = r4.ͺ();	 Catch:{ all -> 0x004a }
        r0.onLoadStarted(r2);	 Catch:{ all -> 0x004a }
    L_0x008c:
        r0 = ˎ;	 Catch:{ all -> 0x004a }
        if (r0 == 0) goto L_0x00ac;
    L_0x0090:
        r0 = new java.lang.StringBuilder;	 Catch:{ all -> 0x004a }
        r0.<init>();	 Catch:{ all -> 0x004a }
        r2 = "finished run method in ";
        r0 = r0.append(r2);	 Catch:{ all -> 0x004a }
        r2 = r4.ʾ;	 Catch:{ all -> 0x004a }
        r2 = o.aaq.ˎ(r2);	 Catch:{ all -> 0x004a }
        r0 = r0.append(r2);	 Catch:{ all -> 0x004a }
        r0 = r0.toString();	 Catch:{ all -> 0x004a }
        r4.ˋ(r0);	 Catch:{ all -> 0x004a }
    L_0x00ac:
        monitor-exit(r1);	 Catch:{ all -> 0x004a }
        goto L_0x0039;
    L_0x00ae:
        r0 = r4.ॱˊ;	 Catch:{ all -> 0x004a }
        r0.getSize(r4);	 Catch:{ all -> 0x004a }
        goto L_0x0071;
        */
        throw new UnsupportedOperationException("Method not decompiled: o.zr.ˏ():void");
    }

    @GuardedBy("requestLock")
    private void ʻ() {
        ᐝ();
        this.ˋ.ˎ();
        this.ॱˊ.removeCallback(this);
        if (this.ॱᐝ != null) {
            this.ॱᐝ.ˊ();
            this.ॱᐝ = null;
        }
    }

    @GuardedBy("requestLock")
    private void ᐝ() {
        if (this.ˊᐝ) {
            throw new IllegalStateException("You can't start or clear loads in RequestListener or Target callbacks. If you're trying to start a fallback request when a load fails, use RequestBuilder#error(RequestBuilder). Otherwise consider posting your into() or clear() calls to the main thread using a Handler instead.");
        }
    }

    /* JADX WARNING: inconsistent code. */
    /* Code decompiled incorrectly, please refer to instructions dump. */
    public void ॱ() {
        /*
        r4 = this;
        r0 = 0;
        r1 = r4.ˏ;
        monitor-enter(r1);
        r4.ᐝ();	 Catch:{ all -> 0x003c }
        r2 = r4.ˋ;	 Catch:{ all -> 0x003c }
        r2.ˎ();	 Catch:{ all -> 0x003c }
        r2 = r4.ˈ;	 Catch:{ all -> 0x003c }
        r3 = o.zr.c.CLEARED;	 Catch:{ all -> 0x003c }
        if (r2 != r3) goto L_0x0014;
    L_0x0012:
        monitor-exit(r1);	 Catch:{ all -> 0x003c }
    L_0x0013:
        return;
    L_0x0014:
        r4.ʻ();	 Catch:{ all -> 0x003c }
        r2 = r4.ॱˎ;	 Catch:{ all -> 0x003c }
        if (r2 == 0) goto L_0x0020;
    L_0x001b:
        r0 = r4.ॱˎ;	 Catch:{ all -> 0x003c }
        r2 = 0;
        r4.ॱˎ = r2;	 Catch:{ all -> 0x003c }
    L_0x0020:
        r2 = r4.ॱˊ();	 Catch:{ all -> 0x003c }
        if (r2 == 0) goto L_0x002f;
    L_0x0026:
        r2 = r4.ॱˊ;	 Catch:{ all -> 0x003c }
        r3 = r4.ͺ();	 Catch:{ all -> 0x003c }
        r2.onLoadCleared(r3);	 Catch:{ all -> 0x003c }
    L_0x002f:
        r2 = o.zr.c.CLEARED;	 Catch:{ all -> 0x003c }
        r4.ˈ = r2;	 Catch:{ all -> 0x003c }
        monitor-exit(r1);	 Catch:{ all -> 0x003c }
        if (r0 == 0) goto L_0x0013;
    L_0x0036:
        r1 = r4.ʼॱ;
        r1.ˊ(r0);
        goto L_0x0013;
    L_0x003c:
        r0 = move-exception;
        monitor-exit(r1);	 Catch:{ all -> 0x003c }
        throw r0;
        */
        throw new UnsupportedOperationException("Method not decompiled: o.zr.ॱ():void");
    }

    public void ˊ() {
        synchronized (this.ˏ) {
            if (ˋ()) {
                ॱ();
            }
        }
    }

    public boolean ˋ() {
        boolean z;
        synchronized (this.ˏ) {
            z = this.ˈ == c.RUNNING || this.ˈ == c.WAITING_FOR_SIZE;
        }
        return z;
    }

    public boolean ˎ() {
        boolean z;
        synchronized (this.ˏ) {
            z = this.ˈ == c.COMPLETE;
        }
        return z;
    }

    public boolean ॱॱ() {
        boolean z;
        synchronized (this.ˏ) {
            z = this.ˈ == c.CLEARED;
        }
        return z;
    }

    @GuardedBy("requestLock")
    private Drawable ʽ() {
        if (this.ʿ == null) {
            this.ʿ = this.ˊॱ.ॱˎ();
            if (this.ʿ == null && this.ˊॱ.ʾ() > 0) {
                this.ʿ = ॱ(this.ˊॱ.ʾ());
            }
        }
        return this.ʿ;
    }

    @GuardedBy("requestLock")
    private Drawable ͺ() {
        if (this.ʽॱ == null) {
            this.ʽॱ = this.ˊॱ.ʽॱ();
            if (this.ʽॱ == null && this.ˊॱ.ʼॱ() > 0) {
                this.ʽॱ = ॱ(this.ˊॱ.ʼॱ());
            }
        }
        return this.ʽॱ;
    }

    @GuardedBy("requestLock")
    private Drawable ˊॱ() {
        if (this.ˋˊ == null) {
            this.ˋˊ = this.ˊॱ.ʿ();
            if (this.ˋˊ == null && this.ˊॱ.ˈ() > 0) {
                this.ˋˊ = ॱ(this.ˊॱ.ˈ());
            }
        }
        return this.ˋˊ;
    }

    @GuardedBy("requestLock")
    private Drawable ॱ(@DrawableRes int i) {
        return xj.ॱ(this.ʼ, i, this.ˊॱ.ˉ() != null ? this.ˊॱ.ˉ() : this.ᐝ.getTheme());
    }

    @GuardedBy("requestLock")
    private void ˋॱ() {
        if (ॱˋ()) {
            Drawable drawable = null;
            if (this.ॱॱ == null) {
                drawable = ˊॱ();
            }
            if (drawable == null) {
                drawable = ʽ();
            }
            if (drawable == null) {
                drawable = ͺ();
            }
            this.ॱˊ.onLoadFailed(drawable);
        }
    }

    /* JADX WARNING: inconsistent code. */
    /* Code decompiled incorrectly, please refer to instructions dump. */
    public void ˊ(int r24, int r25) {
        /*
        r23 = this;
        r0 = r23;
        r2 = r0.ˋ;
        r2.ˎ();
        r0 = r23;
        r0 = r0.ˏ;
        r22 = r0;
        monitor-enter(r22);
        r2 = ˎ;	 Catch:{ all -> 0x0142 }
        if (r2 == 0) goto L_0x0032;
    L_0x0012:
        r2 = new java.lang.StringBuilder;	 Catch:{ all -> 0x0142 }
        r2.<init>();	 Catch:{ all -> 0x0142 }
        r3 = "Got onSizeReady in ";
        r2 = r2.append(r3);	 Catch:{ all -> 0x0142 }
        r0 = r23;
        r4 = r0.ʾ;	 Catch:{ all -> 0x0142 }
        r4 = o.aaq.ˎ(r4);	 Catch:{ all -> 0x0142 }
        r2 = r2.append(r4);	 Catch:{ all -> 0x0142 }
        r2 = r2.toString();	 Catch:{ all -> 0x0142 }
        r0 = r23;
        r0.ˋ(r2);	 Catch:{ all -> 0x0142 }
    L_0x0032:
        r0 = r23;
        r2 = r0.ˈ;	 Catch:{ all -> 0x0142 }
        r3 = o.zr.c.WAITING_FOR_SIZE;	 Catch:{ all -> 0x0142 }
        if (r2 == r3) goto L_0x003c;
    L_0x003a:
        monitor-exit(r22);	 Catch:{ all -> 0x0142 }
    L_0x003b:
        return;
    L_0x003c:
        r2 = o.zr.c.RUNNING;	 Catch:{ all -> 0x0142 }
        r0 = r23;
        r0.ˈ = r2;	 Catch:{ all -> 0x0142 }
        r0 = r23;
        r2 = r0.ˊॱ;	 Catch:{ all -> 0x0142 }
        r2 = r2.ˋˋ();	 Catch:{ all -> 0x0142 }
        r0 = r24;
        r3 = ˊ(r0, r2);	 Catch:{ all -> 0x0142 }
        r0 = r23;
        r0.ˊˋ = r3;	 Catch:{ all -> 0x0142 }
        r0 = r25;
        r2 = ˊ(r0, r2);	 Catch:{ all -> 0x0142 }
        r0 = r23;
        r0.ˉ = r2;	 Catch:{ all -> 0x0142 }
        r2 = ˎ;	 Catch:{ all -> 0x0142 }
        if (r2 == 0) goto L_0x0082;
    L_0x0062:
        r2 = new java.lang.StringBuilder;	 Catch:{ all -> 0x0142 }
        r2.<init>();	 Catch:{ all -> 0x0142 }
        r3 = "finished setup for calling load in ";
        r2 = r2.append(r3);	 Catch:{ all -> 0x0142 }
        r0 = r23;
        r4 = r0.ʾ;	 Catch:{ all -> 0x0142 }
        r4 = o.aaq.ˎ(r4);	 Catch:{ all -> 0x0142 }
        r2 = r2.append(r4);	 Catch:{ all -> 0x0142 }
        r2 = r2.toString();	 Catch:{ all -> 0x0142 }
        r0 = r23;
        r0.ˋ(r2);	 Catch:{ all -> 0x0142 }
    L_0x0082:
        r0 = r23;
        r2 = r0.ʼॱ;	 Catch:{ all -> 0x0142 }
        r0 = r23;
        r3 = r0.ʼ;	 Catch:{ all -> 0x0142 }
        r0 = r23;
        r4 = r0.ॱॱ;	 Catch:{ all -> 0x0142 }
        r0 = r23;
        r5 = r0.ˊॱ;	 Catch:{ all -> 0x0142 }
        r5 = r5.ˋˊ();	 Catch:{ all -> 0x0142 }
        r0 = r23;
        r6 = r0.ˊˋ;	 Catch:{ all -> 0x0142 }
        r0 = r23;
        r7 = r0.ˉ;	 Catch:{ all -> 0x0142 }
        r0 = r23;
        r8 = r0.ˊॱ;	 Catch:{ all -> 0x0142 }
        r8 = r8.ॱᐝ();	 Catch:{ all -> 0x0142 }
        r0 = r23;
        r9 = r0.ʽ;	 Catch:{ all -> 0x0142 }
        r0 = r23;
        r10 = r0.ͺ;	 Catch:{ all -> 0x0142 }
        r0 = r23;
        r11 = r0.ˊॱ;	 Catch:{ all -> 0x0142 }
        r11 = r11.ॱˋ();	 Catch:{ all -> 0x0142 }
        r0 = r23;
        r12 = r0.ˊॱ;	 Catch:{ all -> 0x0142 }
        r12 = r12.ˊॱ();	 Catch:{ all -> 0x0142 }
        r0 = r23;
        r13 = r0.ˊॱ;	 Catch:{ all -> 0x0142 }
        r13 = r13.ᐝॱ();	 Catch:{ all -> 0x0142 }
        r0 = r23;
        r14 = r0.ˊॱ;	 Catch:{ all -> 0x0142 }
        r14 = r14.ˍ();	 Catch:{ all -> 0x0142 }
        r0 = r23;
        r15 = r0.ˊॱ;	 Catch:{ all -> 0x0142 }
        r15 = r15.ʻॱ();	 Catch:{ all -> 0x0142 }
        r0 = r23;
        r0 = r0.ˊॱ;	 Catch:{ all -> 0x0142 }
        r16 = r0;
        r16 = r16.ˊᐝ();	 Catch:{ all -> 0x0142 }
        r0 = r23;
        r0 = r0.ˊॱ;	 Catch:{ all -> 0x0142 }
        r17 = r0;
        r17 = r17.ˎˏ();	 Catch:{ all -> 0x0142 }
        r0 = r23;
        r0 = r0.ˊॱ;	 Catch:{ all -> 0x0142 }
        r18 = r0;
        r18 = r18.ˏˏ();	 Catch:{ all -> 0x0142 }
        r0 = r23;
        r0 = r0.ˊॱ;	 Catch:{ all -> 0x0142 }
        r19 = r0;
        r19 = r19.ͺॱ();	 Catch:{ all -> 0x0142 }
        r0 = r23;
        r0 = r0.ʻॱ;	 Catch:{ all -> 0x0142 }
        r21 = r0;
        r20 = r23;
        r2 = r2.ˏ(r3, r4, r5, r6, r7, r8, r9, r10, r11, r12, r13, r14, r15, r16, r17, r18, r19, r20, r21);	 Catch:{ all -> 0x0142 }
        r0 = r23;
        r0.ॱᐝ = r2;	 Catch:{ all -> 0x0142 }
        r0 = r23;
        r2 = r0.ˈ;	 Catch:{ all -> 0x0142 }
        r3 = o.zr.c.RUNNING;	 Catch:{ all -> 0x0142 }
        if (r2 == r3) goto L_0x011b;
    L_0x0116:
        r2 = 0;
        r0 = r23;
        r0.ॱᐝ = r2;	 Catch:{ all -> 0x0142 }
    L_0x011b:
        r2 = ˎ;	 Catch:{ all -> 0x0142 }
        if (r2 == 0) goto L_0x013f;
    L_0x011f:
        r2 = new java.lang.StringBuilder;	 Catch:{ all -> 0x0142 }
        r2.<init>();	 Catch:{ all -> 0x0142 }
        r3 = "finished onSizeReady in ";
        r2 = r2.append(r3);	 Catch:{ all -> 0x0142 }
        r0 = r23;
        r4 = r0.ʾ;	 Catch:{ all -> 0x0142 }
        r4 = o.aaq.ˎ(r4);	 Catch:{ all -> 0x0142 }
        r2 = r2.append(r4);	 Catch:{ all -> 0x0142 }
        r2 = r2.toString();	 Catch:{ all -> 0x0142 }
        r0 = r23;
        r0.ˋ(r2);	 Catch:{ all -> 0x0142 }
    L_0x013f:
        monitor-exit(r22);	 Catch:{ all -> 0x0142 }
        goto L_0x003b;
    L_0x0142:
        r2 = move-exception;
        monitor-exit(r22);	 Catch:{ all -> 0x0142 }
        throw r2;
        */
        throw new UnsupportedOperationException("Method not decompiled: o.zr.ˊ(int, int):void");
    }

    private static int ˊ(int i, float f) {
        return i == Integer.MIN_VALUE ? i : Math.round(((float) i) * f);
    }

    @GuardedBy("requestLock")
    private boolean ˏॱ() {
        return this.ʻ == null || this.ʻ.ˎ(this);
    }

    @GuardedBy("requestLock")
    private boolean ॱˊ() {
        return this.ʻ == null || this.ʻ.ˊ(this);
    }

    @GuardedBy("requestLock")
    private boolean ॱˋ() {
        return this.ʻ == null || this.ʻ.ˋ(this);
    }

    @GuardedBy("requestLock")
    private boolean ॱᐝ() {
        return this.ʻ == null || !this.ʻ.ʼ();
    }

    @GuardedBy("requestLock")
    private void ʻॱ() {
        if (this.ʻ != null) {
            this.ʻ.ॱ(this);
        }
    }

    @GuardedBy("requestLock")
    private void ॱˎ() {
        if (this.ʻ != null) {
            this.ʻ.ʽ(this);
        }
    }

    /* JADX WARNING: inconsistent code. */
    /* Code decompiled incorrectly, please refer to instructions dump. */
    public void ˋ(o.tx<?> r6, o.rz r7) {
        /*
        r5 = this;
        r1 = 0;
        r0 = r5.ˋ;
        r0.ˎ();
        r2 = r5.ˏ;	 Catch:{ all -> 0x00df }
        monitor-enter(r2);	 Catch:{ all -> 0x00df }
        r0 = 0;
        r5.ॱᐝ = r0;	 Catch:{ all -> 0x00d1 }
        if (r6 != 0) goto L_0x003a;
    L_0x000e:
        r0 = new com.bumptech.glide.load.engine.GlideException;	 Catch:{ all -> 0x00d1 }
        r3 = new java.lang.StringBuilder;	 Catch:{ all -> 0x00d1 }
        r3.<init>();	 Catch:{ all -> 0x00d1 }
        r4 = "Expected to receive a Resource<R> with an object of ";
        r3 = r3.append(r4);	 Catch:{ all -> 0x00d1 }
        r4 = r5.ʽ;	 Catch:{ all -> 0x00d1 }
        r3 = r3.append(r4);	 Catch:{ all -> 0x00d1 }
        r4 = " inside, but instead got null.";
        r3 = r3.append(r4);	 Catch:{ all -> 0x00d1 }
        r3 = r3.toString();	 Catch:{ all -> 0x00d1 }
        r0.<init>(r3);	 Catch:{ all -> 0x00d1 }
        r5.ˏ(r0);	 Catch:{ all -> 0x00d1 }
        monitor-exit(r2);	 Catch:{ all -> 0x00d1 }
        if (r1 == 0) goto L_0x0039;
    L_0x0034:
        r0 = r5.ʼॱ;
        r0.ˊ(r1);
    L_0x0039:
        return;
    L_0x003a:
        r3 = r6.ˋ();	 Catch:{ all -> 0x00d1 }
        if (r3 == 0) goto L_0x004c;
    L_0x0040:
        r0 = r5.ʽ;	 Catch:{ all -> 0x00d1 }
        r4 = r3.getClass();	 Catch:{ all -> 0x00d1 }
        r0 = r0.isAssignableFrom(r4);	 Catch:{ all -> 0x00d1 }
        if (r0 != 0) goto L_0x00ad;
    L_0x004c:
        r0 = 0;
        r5.ॱˎ = r0;	 Catch:{ all -> 0x00e1 }
        r1 = new com.bumptech.glide.load.engine.GlideException;	 Catch:{ all -> 0x00e1 }
        r0 = new java.lang.StringBuilder;	 Catch:{ all -> 0x00e1 }
        r0.<init>();	 Catch:{ all -> 0x00e1 }
        r4 = "Expected to receive an object of ";
        r0 = r0.append(r4);	 Catch:{ all -> 0x00e1 }
        r4 = r5.ʽ;	 Catch:{ all -> 0x00e1 }
        r0 = r0.append(r4);	 Catch:{ all -> 0x00e1 }
        r4 = " but instead got ";
        r4 = r0.append(r4);	 Catch:{ all -> 0x00e1 }
        if (r3 == 0) goto L_0x00a7;
    L_0x006a:
        r0 = r3.getClass();	 Catch:{ all -> 0x00e1 }
    L_0x006e:
        r0 = r4.append(r0);	 Catch:{ all -> 0x00e1 }
        r4 = "{";
        r0 = r0.append(r4);	 Catch:{ all -> 0x00e1 }
        r0 = r0.append(r3);	 Catch:{ all -> 0x00e1 }
        r4 = "} inside Resource{";
        r0 = r0.append(r4);	 Catch:{ all -> 0x00e1 }
        r0 = r0.append(r6);	 Catch:{ all -> 0x00e1 }
        r4 = "}.";
        r4 = r0.append(r4);	 Catch:{ all -> 0x00e1 }
        if (r3 == 0) goto L_0x00aa;
    L_0x008e:
        r0 = "";
    L_0x0090:
        r0 = r4.append(r0);	 Catch:{ all -> 0x00e1 }
        r0 = r0.toString();	 Catch:{ all -> 0x00e1 }
        r1.<init>(r0);	 Catch:{ all -> 0x00e1 }
        r5.ˏ(r1);	 Catch:{ all -> 0x00e1 }
        monitor-exit(r2);	 Catch:{ all -> 0x00e1 }
        if (r6 == 0) goto L_0x0039;
    L_0x00a1:
        r0 = r5.ʼॱ;
        r0.ˊ(r6);
        goto L_0x0039;
    L_0x00a7:
        r0 = "";
        goto L_0x006e;
    L_0x00aa:
        r0 = " To indicate failure return a null Resource object, rather than a Resource object containing null data.";
        goto L_0x0090;
    L_0x00ad:
        r0 = r5.ˏॱ();	 Catch:{ all -> 0x00d1 }
        if (r0 != 0) goto L_0x00c4;
    L_0x00b3:
        r0 = 0;
        r5.ॱˎ = r0;	 Catch:{ all -> 0x00e1 }
        r0 = o.zr.c.COMPLETE;	 Catch:{ all -> 0x00e1 }
        r5.ˈ = r0;	 Catch:{ all -> 0x00e1 }
        monitor-exit(r2);	 Catch:{ all -> 0x00e1 }
        if (r6 == 0) goto L_0x0039;
    L_0x00bd:
        r0 = r5.ʼॱ;
        r0.ˊ(r6);
        goto L_0x0039;
    L_0x00c4:
        r5.ˏ(r6, r3, r7);	 Catch:{ all -> 0x00d1 }
        monitor-exit(r2);	 Catch:{ all -> 0x00d1 }
        if (r1 == 0) goto L_0x0039;
    L_0x00ca:
        r0 = r5.ʼॱ;
        r0.ˊ(r1);
        goto L_0x0039;
    L_0x00d1:
        r0 = move-exception;
        r6 = r1;
    L_0x00d3:
        monitor-exit(r2);	 Catch:{ all -> 0x00e1 }
        throw r0;	 Catch:{ all -> 0x00d5 }
    L_0x00d5:
        r0 = move-exception;
        r1 = r6;
    L_0x00d7:
        if (r1 == 0) goto L_0x00de;
    L_0x00d9:
        r2 = r5.ʼॱ;
        r2.ˊ(r1);
    L_0x00de:
        throw r0;
    L_0x00df:
        r0 = move-exception;
        goto L_0x00d7;
    L_0x00e1:
        r0 = move-exception;
        goto L_0x00d3;
        */
        throw new UnsupportedOperationException("Method not decompiled: o.zr.ˋ(o.tx, o.rz):void");
    }

    @GuardedBy("requestLock")
    private void ˏ(tx<R> txVar, R r, rz rzVar) {
        boolean ॱᐝ = ॱᐝ();
        this.ˈ = c.COMPLETE;
        this.ॱˎ = txVar;
        if (this.ʼ.ˊ() <= 3) {
            Log.d("Glide", "Finished loading " + r.getClass().getSimpleName() + " from " + rzVar + " for " + this.ॱॱ + " with size [" + this.ˊˋ + "x" + this.ˉ + "] in " + aaq.ˎ(this.ʾ) + " ms");
        }
        this.ˊᐝ = true;
        try {
            int i;
            int i2;
            if (this.ᐝॱ != null) {
                i = 0;
                for (zn ˎ : this.ᐝॱ) {
                    i |= ˎ.ˎ(r, this.ॱॱ, this.ॱˊ, rzVar, ॱᐝ);
                }
            } else {
                i = 0;
            }
            if (this.ॱ != null) {
                if (this.ॱ.ˎ(r, this.ॱॱ, this.ॱˊ, rzVar, ॱᐝ)) {
                    i2 = 1;
                    if ((i2 | i) == 0) {
                        this.ॱˊ.onResourceReady(r, this.ॱˋ.ˋ(rzVar, ॱᐝ));
                    }
                    this.ˊᐝ = false;
                    ʻॱ();
                }
            }
            i2 = 0;
            if ((i2 | i) == 0) {
                this.ॱˊ.onResourceReady(r, this.ॱˋ.ˋ(rzVar, ॱᐝ));
            }
            this.ˊᐝ = false;
            ʻॱ();
        } catch (Throwable th) {
            this.ˊᐝ = false;
        }
    }

    public void ˏ(GlideException glideException) {
        ˊ(glideException, 5);
    }

    public Object ʼ() {
        this.ˋ.ˎ();
        return this.ˏ;
    }

    private void ˊ(GlideException glideException, int i) {
        this.ˋ.ˎ();
        synchronized (this.ˏ) {
            glideException.ˎ(this.ˊˊ);
            int ˊ = this.ʼ.ˊ();
            if (ˊ <= i) {
                Log.w("Glide", "Load failed for " + this.ॱॱ + " with size [" + this.ˊˋ + "x" + this.ˉ + "]", glideException);
                if (ˊ <= 4) {
                    glideException.ˎ("Glide");
                }
            }
            this.ॱᐝ = null;
            this.ˈ = c.FAILED;
            this.ˊᐝ = true;
            try {
                int i2;
                if (this.ᐝॱ != null) {
                    i2 = 0;
                    for (zn ॱ : this.ᐝॱ) {
                        i2 |= ॱ.ॱ(glideException, this.ॱॱ, this.ॱˊ, ॱᐝ());
                    }
                } else {
                    i2 = 0;
                }
                ˊ = (this.ॱ == null || !this.ॱ.ॱ(glideException, this.ॱॱ, this.ॱˊ, ॱᐝ())) ? 0 : 1;
                if ((ˊ | i2) == 0) {
                    ˋॱ();
                }
                this.ˊᐝ = false;
                ॱˎ();
            } catch (Throwable th) {
                this.ˊᐝ = false;
            }
        }
    }

    public boolean ˏ(zm zmVar) {
        if (!(zmVar instanceof zr)) {
            return false;
        }
        synchronized (this.ˏ) {
            int i = this.ˋॱ;
            int i2 = this.ˏॱ;
            Object obj = this.ॱॱ;
            Class cls = this.ʽ;
            ze zeVar = this.ˊॱ;
            rl rlVar = this.ͺ;
            int size = this.ᐝॱ != null ? this.ᐝॱ.size() : 0;
        }
        zr zrVar = (zr) zmVar;
        synchronized (zrVar.ˏ) {
            int i3 = zrVar.ˋॱ;
            int i4 = zrVar.ˏॱ;
            Object obj2 = zrVar.ॱॱ;
            Class cls2 = zrVar.ʽ;
            ze zeVar2 = zrVar.ˊॱ;
            rl rlVar2 = zrVar.ͺ;
            int size2 = zrVar.ᐝॱ != null ? zrVar.ᐝॱ.size() : 0;
        }
        if (i == i3 && i2 == i4 && aau.ˎ(obj, obj2) && cls.equals(cls2) && zeVar.equals(zeVar2) && rlVar == rlVar2 && size == size2) {
            return true;
        }
        return false;
    }

    private void ˋ(String str) {
        Log.v("Request", str + " this: " + this.ˊ);
    }
}
